Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds support in the Dave webapp to send generic inputs to an application via the Cartesi InputBox, with multiple input encoding modes (raw hex, string-to-hex, and ABI-based encoding) to reach feature parity with existing “send” flows.
Changes:
- Introduces a new
GenericInputFormwith validation, ABI/spec selection, and encoding helpers. - Wires “Input” into the Send menu/modal and passes JSON_ABI specifications into the form.
- Temporarily disables publishing Coveralls reports in CI.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/dave/src/components/transactions/GenericInputForm/index.tsx | Main generic input UI and transaction execution flow |
| apps/dave/src/components/transactions/GenericInputForm/useGenericInputForm.tsx | Form setup, validation wiring, and transformed values/spec selection |
| apps/dave/src/components/transactions/GenericInputForm/validations.ts | Field validators for app address, hex input, ABI inputs/params |
| apps/dave/src/components/transactions/GenericInputForm/utils.ts | ABI parsing/spec generation, tuple flattening, and argument encoding helpers |
| apps/dave/src/components/transactions/GenericInputForm/types.ts | Form and ABI-related types |
| apps/dave/src/components/transactions/GenericInputForm/initialValues.ts | Initial form values |
| apps/dave/src/components/transactions/GenericInputForm/context.tsx | Mantine form context for the feature |
| apps/dave/src/components/transactions/GenericInputForm/hooks/useInputBoxAddInput.tsx | Wagmi simulate/write/wait wrapper for InputBox addInput |
| apps/dave/src/components/transactions/GenericInputForm/AbiFields.tsx | ABI method/spec selection and display of encoded hex output |
| apps/dave/src/components/transactions/GenericInputForm/AbiFunctionName.tsx | Function selection UI for JSON_ABI specs |
| apps/dave/src/components/transactions/GenericInputForm/AbiFunctionParams.tsx | Function argument inputs (incl. tuple handling) |
| apps/dave/src/components/transactions/GenericInputForm/TupleComponents.tsx | Recursive tuple component rendering |
| apps/dave/src/components/transactions/GenericInputForm/AbiParameter.tsx | ABI-params entry flow for encoding without selectors |
| apps/dave/src/components/transactions/GenericInputForm/FunctionSignature.tsx | Function signature/label rendering helpers |
| apps/dave/src/components/send/SendMenu.tsx | Enables “Input” send action and forwards filtered specifications |
| apps/dave/src/components/send/SendModal.tsx | Renders GenericInputForm for generic_input transaction type |
| apps/dave/src/components/send/SendProvider.tsx | Stores specifications in send state for generic input actions |
| apps/dave/src/components/send/SendContexts.tsx | Extends send state/action types to include specifications |
| apps/dave/src/components/send/hooks.tsx | Updates sendGenericInput action signature to accept specs |
| .github/workflows/ci.yml | Disables Coveralls publish step |
Comments suppressed due to low confidence (1)
apps/dave/src/components/transactions/GenericInputForm/AbiFunctionParams.tsx:55
- Typo in
data-testid:empty-inputs-argments-alertshould beempty-inputs-arguments-alertto avoid propagating the misspelling into tests and tooling.
data-testid="empty-inputs-argments-alert"
>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
apps/dave/src/components/transactions/GenericInputForm/TupleComponents.tsx
Show resolved
Hide resolved
apps/dave/src/components/transactions/GenericInputForm/useGenericInputForm.tsx
Show resolved
Hide resolved
959af0b to
6101d4d
Compare
5d156e4 to
15ae89f
Compare
15ae89f to
e612f01
Compare
@guidanoli I created an issue for that #442, as this is a port, and this problem you caught also exists in the current explorer. I would like to address that in a separate PR. |
* Support to raw hex value added. * Support to string to hex added. * Support ABI encoding added.
e365510 to
12014df
Compare

Summary
The code changes in this PR achieve feature parity in terms of a user be able to send transactions (i.e. deposits through portals and generic input through the input box).
Even though the add-input is the simplest in terms of smart contract interface, it was the last to be added as it depends on the PR #434 (ABI encoding/decoding support), since we provide ways for the user to choose how they want to send the data i.e. using a raw hex value, or a string to be converted to hex, or ABI encoding to define the input to be sent.
PS: Currently I am skipping the CI step to publish the test reports to coveralls. It is having service outage for a couple of days at the moment of writing. They don't have an ETA, more details here: https://status.coveralls.io/
closes: #435